﻿CREATE TABLE [dbo].[TB_Rendiciones] (
    [Sysid]                   INT           IDENTITY (1, 1) NOT NULL,
    [SysProyecto]             INT           NULL,
    [SysEstado]               INT           NULL,
    [Respaldo_SaldoAsignado]  NCHAR (10)    NULL,
    [Respaldo_Saldo]          INT           NULL,
    [SysUsuario]              INT           NULL,
    [FechaCreacion]           DATETIME      NULL,
    [ComentariosSupervisor] VARCHAR (MAX) NULL,
    [ComentariosGerente]    VARCHAR (MAX) NULL,
    [Monto] INT NULL, 
    [NroCheque] VARCHAR(50) NULL, 
    [NroTransferencia] VARCHAR(50) NULL, 
    [NroDeposito] VARCHAR(50) NULL, 
    [SysBanco] INT NULL, 
    CONSTRAINT [PK_TB_Renciones] PRIMARY KEY CLUSTERED ([Sysid] ASC),
    CONSTRAINT [FK_TB_Renciones_Tb_Proyectos] FOREIGN KEY ([SysProyecto]) REFERENCES [dbo].[Tb_Proyectos] ([SysProyecto]),
    CONSTRAINT [FK_TB_Rendiciones_TB_Estado] FOREIGN KEY ([SysEstado]) REFERENCES [dbo].[TB_Estado] ([Sysid]),
    CONSTRAINT [FK_TB_Rendiciones_TB_Usuario] FOREIGN KEY ([SysUsuario]) REFERENCES [dbo].[TB_Usuario] ([Sysid])
);

